package com.huilang.demo1;

public class Client {
    public static void main(String[] args) {
        FriedRice friedRice = new FriedRice();

        FastFood fastFood = new Egg(friedRice);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());

        fastFood= new Egg(fastFood);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());

        fastFood=new Bacon(fastFood);
        System.out.println(fastFood.getDesc());
        System.out.println(fastFood.cost());
    }
}
